import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Index from '@/components/home/index'
import Login from '@/components/account/login'

import InfoAgent from '@/components/info/agent/list'
import InfoAgentAdd from '@/components/info/agent/add'
import InfoAgentEdit from '@/components/info/agent/edit'

import InfoAgentStat from '@/components/info/agent/statbase'

import LoanRisked from '@/components/loan/risked'
import LoanAudited from '@/components/loan/audited'
import LoanSigned from '@/components/loan/signed'
import LoanLending from '@/components/loan/lending'
import LoanUnrepaid from '@/components/loan/unrepaid'
import LoanDetails from '@/components/loan/detail'

import FinanceRecharge from '@/components/finance/recharge/list'
import FinanceRechargeAdd from '@/components/finance/recharge/add'

import AccountEditPassword from '@/components/account/editPassword'
import AccountEditInfo from '@/components/account/editInfo'

import SystemAgentUser from '@/components/agent/user/list'
import SystemAgentUserEdit from '@/components/agent/user/edit'
import SystemAgentUserAdd from '@/components/agent/user/add'
import SystemAgentRole from '@/components/agent/role/list'
import SystemAgentRoleEdit from '@/components/agent/role/edit'
import SystemAgentRoleAdd from '@/components/agent/role/add'
import SystemAgentMenu from '@/components/agent/menu/list'
import SystemAgentOffice from '@/components/agent/office/list'

import SystemAdminUser from '@/components/system/user/list'
import SystemAdminUserEdit from '@/components/system/user/edit'
import SystemAdminUserAdd from '@/components/system/user/add'
import SystemAdminRole from '@/components/system/role/list'
import SystemAdminRoleEdit from '@/components/system/role/edit'
import SystemAdminRoleAdd from '@/components/system/role/add'
import SystemAdminMenu from '@/components/system/menu/list'
import SystemAdminOffice from '@/components/system/office/list'

import UE from '@/components/common/ue'

Vue.use(Router);

const routes = [
    {path: '/login', component: Login, name: 'login'},
    {
        path: '/',
        component: Main,
        children: [
            {path: '/', component: Index, name: 'index'},
            {path: '/editPassword', component: AccountEditPassword, name: 'accountEditPassword'},
            {path: '/editInfo', component: AccountEditInfo, name: 'accountEditInfo'}
        ]
    },
    {
        path: '/',
        component: Main,
        children: [
            {path: '/info/agent/list', component: InfoAgent, name: 'infoAgent'},
            {path: '/info/agent/statbase', component: InfoAgentStat, name: 'InfoAgentStat'},
            {path: '/info/agent/add', component: InfoAgentAdd, name: 'infoAgentAdd'},
            {path: '/info/agent/edit', component: InfoAgentEdit, name: 'infoAgentEdit'}
        ]
    },
    {
        path: '/',
        component: Main,
        children: [
            {path: '/finance/recharge/list', component: FinanceRecharge, name: 'financeRecharge'},
            {path: '/finance/recharge/add', component: FinanceRechargeAdd, name: 'financeRechargeAdd'}
        ]
    },
    {
        path: '/',
        component: Main,
        children: [
            {path: '/loan/risked', component: LoanRisked, name: 'loanRisked'},
            {path: '/loan/audited', component: LoanAudited, name: 'loanAudited'},
            {path: '/loan/signed', component: LoanSigned, name: 'loanSigned'},
            {path: '/loan/Lending', component: LoanLending, name: 'loanLending'},
            {path: '/loan/unrepaid', component: LoanUnrepaid, name: 'loanUnrepaid'},
            {path: '/loan/details', component: LoanDetails, name: 'loanDetails'}
        ]
    },
    {
        path: '/',
        component: Main,
        children: [
            {path: '/system/agent/user/list', component: SystemAgentUser, name: 'systemAgentUser'},
            {path: '/system/agent/user/edit', component: SystemAgentUserEdit, name: 'systemAgentUserEdit'},
            {path: '/system/agent/user/add', component: SystemAgentUserAdd, name: 'systemAgentUserAdd'},
            {path: '/system/agent/role/list', component: SystemAgentRole, name: 'systemAgentRole'},
            {path: '/system/agent/role/edit', component: SystemAgentRoleEdit, name: 'systemAgentRoleEdit'},
            {path: '/system/agent/role/add', component: SystemAgentRoleAdd, name: 'systemAgentRoleAdd'},
            {path: '/system/agent/menu/list', component: SystemAgentMenu, name: 'systemAgentMenu'},
            {path: '/system/agent/office/list', component: SystemAgentOffice, name: 'systemAgentOffice'}
        ]
    },
    {
        path: '/',
        component: Main,
        children: [
            {path: '/system/admin/user/list', component: SystemAdminUser, name: 'systemAdminUser'},
            {path: '/system/admin/user/edit', component: SystemAdminUserEdit, name: 'systemAdminUserEdit'},
            {path: '/system/admin/user/add', component: SystemAdminUserAdd, name: 'systemAdminUserAdd'},
            {path: '/system/admin/role/list', component: SystemAdminRole, name: 'systemAdminRole'},
            {path: '/system/admin/role/edit', component: SystemAdminRoleEdit, name: 'systemAdminRoleEdit'},
            {path: '/system/admin/role/add', component: SystemAdminRoleAdd, name: 'systemAdminRoleAdd'},
            {path: '/system/admin/menu/list', component: SystemAdminMenu, name: 'systemAdminMenu'},
            {path: '/system/admin/office/list', component: SystemAdminOffice, name: 'systemAdminOffice'}
        ]
    }
]
export default routes
/*export default {

 routes
 }*/
